package org.jks.controller;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.jks.config.Config;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/workMgr")
public class WorkManager {
	@RequestMapping("/")
	public ModelAndView index(HttpServletRequest request, HttpServletResponse response, HttpSession session, Map<String,Object> model) {
		Config.init(request, response, session, model);
		return new ModelAndView("workMgr/index", model);
	}
	
	@RequestMapping("/index")
	public ModelAndView index1(HttpServletRequest request, HttpServletResponse response, HttpSession session, Map<String,Object> model) {
		Config.init(request, response, session, model);
		return new ModelAndView("workMgr/index", model);
	}
	
	@RequestMapping("/cd_work")
	public ModelAndView cdWork(HttpServletRequest request, HttpServletResponse response, HttpSession session, Map<String,Object> model) {
		Config.init(request, response, session, model);
		return new ModelAndView("workMgr/cd_work", model);
	}
	
	@RequestMapping("/fx_work")
	public ModelAndView fxWork(HttpServletRequest request, HttpServletResponse response, HttpSession session, Map<String,Object> model) {
		Config.init(request, response, session, model);
		return new ModelAndView("workMgr/fx_work", model);
	}
	
	@RequestMapping("/addfxwork")
	public ModelAndView addFxWork(HttpServletRequest request, HttpServletResponse response, HttpSession session, Map<String,Object> model) {
		Config.init(request, response, session, model);
		return new ModelAndView("workMgr/add_fx_work", model);
	}
	
	@RequestMapping("/wh_ts")
	public ModelAndView whTs(HttpServletRequest request, HttpServletResponse response, HttpSession session, Map<String,Object> model) {
		Config.init(request, response, session, model);
		return new ModelAndView("workMgr/wh_ts", model);
	}
	
	@RequestMapping("/flight_line_mgr")
	public ModelAndView flightLine(HttpServletRequest request, HttpServletResponse response, HttpSession session, Map<String,Object> model) {
		Config.init(request, response, session, model);
		return new ModelAndView("workMgr/flight_line_mgr", model);
	}
	
	@RequestMapping("/gtzb_mgr/{id}")
	public ModelAndView gtzbMgr(@PathVariable long id, HttpServletRequest request, HttpServletResponse response, HttpSession session, Map<String,Object> model) {
		Config.init(request, response, session, model);
		model.put("flight_line", id);
		return new ModelAndView("workMgr/gtzb_mgr", model);
	}
	
	@RequestMapping("/flight_angle_mgr/{id}")
	public ModelAndView flightAngleMgr(@PathVariable long id, HttpServletRequest request, HttpServletResponse response, HttpSession session, Map<String,Object> model) {
		Config.init(request, response, session, model);
		model.put("flight_line", id);
		return new ModelAndView("workMgr/flight_angle_mgr", model);
	}
}
